//text to chatArea

function displayText(input, field, id) {
var text = input.toLowerCase();
var disp = "";
chatline = new Array();
  if (text.length > 32){
		slices = splitInput(text, 32);
		disp = '<br>' + id + ':' + '<br>' + slices;
  }
  else {
        disp = '<br>' + id + ':' + '<br>' + text;
  }
	field.value = "";
	var show = $('#chatArea').html() + disp; 
	$('#chatArea').html(show);
	$('#chatArea').animate({ scrollTop: 60000 }, 'slow');
	return false; 
}

// Text to reasonable slices 
function splitInput(string,n) {
var b = ''; 
var s = string;
	while (s.length > n) {
		var c = s.substring(0,n);
		var d = c.lastIndexOf(' ');
		var e =c.lastIndexOf('<br>');
		if (e != -1) d = e; 
		if (d == -1) d = n; 
		b += c.substring(0,d) + '<br>';
		s = s.substring(d+1);
		}return b+s;
}

//botChat

function botChat(id){
}